/*
 * External.h
 *
 *  Created on: Jan 30, 2013
 *      Author: baneling
 */

#ifndef _EXTERNAL_H_
#define _EXTERNAL_H_

#include "structs.h"
#include "includes.h"

using namespace std;

class External {
public:
	static void printItem(qItem_t item,string name="none");
	static void printGroup(qGroup_t group,string name="none");
	static void printFamily(qFam_t family,string name="none");
	static qGroup_t initQgroup(qGroup_t group);
	static qGroup_t initQgroupFromState(qGroup_t group, state_t state);
	static state_t copyState( state_t tofill,  state_t tobecopied);
	static qFam_t initQfamFromCoords(qFam_t family, int x=0, int y=0);
	static qItem_t initQitem(qItem_t item);
	static bool compareQitemAngleState(qItem_t item1,qItem_t item2);
	static qItem_t copyQitem(qItem_t item1,qItem_t item2);
	static double distance(double ax, double ay, double bx, double by);
	static bool isGoodAngle(int angle);
private:
	External();
	virtual ~External();
};

#endif /* EXTERNAL_H_ */
